//
//  HEShufCell.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/11/25.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEShufCell.h"

@interface HEShufCell ()

@property (nonatomic, strong) UIImageView *imageView;

@property (nonatomic, strong) UILabel *titleLb;

@end

@implementation HEShufCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
 
    _imageView = [UIImageView new];
    _imageView.image = IMAGE_NAMED(@"guide_notify");
    _imageView.contentMode = UIViewContentModeScaleAspectFill;
    [self.contentView addSubview:_imageView];
    
    _titleLb = [UILabel new];
    _titleLb.text = @"-";
    _titleLb.font = DYFont(14);
    _titleLb.textColor = KWhiteColor;
    [self.contentView addSubview:_titleLb];
    
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.contentView).mas_offset(14);
        make.width.height.mas_offset(15);
    }];

    [_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).mas_offset(0);
        make.left.equalTo(_imageView.mas_right).mas_offset(10);
        make.right.equalTo(self.contentView).mas_offset(-15);
        make.bottom.equalTo(self.contentView).mas_offset(-0);
    }];
}

- (void)setTitle:(NSString *)title {
    _title = title;
    _titleLb.text = title;
}

@end
